package org.postgresql.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class TestConn {
    public static void main(String[] args) {
        Connection conn = null;
        try {
            Class.forName("org.postgresql.Driver");
            conn = DriverManager.getConnection("jdbc:vastbase://172.16.105.55:5432/vastbase?loggerLevel=OFF", "vastbase", "Vbase@admin");
            System.out.println("[SUCCESS] conn database success.");
        } catch (Exception e) {
            System.out.println("[FAIL] conn database fail." + e.getMessage());
        } finally {
            if (conn != null) {
                try {
                    conn.close();
                } catch (SQLException e) {
                    System.out.println("[FAIL] close conn fail." + e.getMessage());
                }
            }
        }
    }
}
